﻿<controls:ChildWindow xmlns:my1="clr-namespace:SharedCode.Controls;assembly=SharedCode"  
           xmlns:my="clr-namespace:IndexMarkSilverlightClient.Views.Controls.ReportsControls"  
           x:Class="IndexMarkSilverlightClient.Views.Subscribe.SubscribeWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="650" Height="550" 
           Title="Подписка на уведомления"
           Loaded="ChildWindow_Loaded">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="28" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <my:USTUTreeView2 x:Name="USTUTreeView" />
        
        <my1:LoadingBar Visibility="Collapsed" x:Name="loadingBar" VerticalAlignment="Center" 
                        HorizontalAlignment="Center" Canvas.ZIndex="1" Width="350" Height="76" />
        
        <StackPanel x:Name="buttonsStackPanel" Grid.Row="1" Orientation="Horizontal">
            <StackPanel x:Name="mailStackPanel" Orientation="Horizontal">
                <TextBlock VerticalAlignment="Center" Text="Адрес электронной почты:" Margin="0,0,5,0"></TextBlock>
                <TextBox IsEnabled="{Binding ElementName=subscriberStatus, Path=IsChecked, Mode=TwoWay}" ToolTipService.ToolTip="Например, ivanov@ugtu.net" x:Name="email" VerticalAlignment="Center" Height="24" Width="230"></TextBox>
                <CheckBox VerticalAlignment="Center" Margin="10,0,0,0" x:Name="subscriberStatus" ToolTipService.ToolTip="Включить / отключить подписку" Content="Включить"></CheckBox>
            </StackPanel>
            <Button x:Name="CreateSubscribeButton" Click="CreateSubscribeButton_Click" Margin="10,0,0,0" Width="95" Height="23" FontWeight="Bold" Content="Подписаться!"></Button>
        </StackPanel>
        
        <StackPanel x:Name="formButtons" Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Right" Margin="0,12,0,0">
            <Button x:Name="OKButton" Content="Сохранить и закрыть" Click="OKButton_Click" Width="160" Height="23" />
            <Button x:Name="CancelButton" Content="Отмена" Click="CancelButton_Click" Width="75" Height="23" Margin="5,0,0,0" />
        </StackPanel>
    </Grid>
</controls:ChildWindow>